<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>加载中</title>
    <link href=static/css/app.bcda7e732f22e5bced411d0d40e46bc4.css rel=stylesheet>
</head>

<body>
    <div id="app-box"></div>
    <script src="js/sea-debug.js"></script>
    <script src="Lazyload.min.js" type="text/javascript"></script>
    <script>
    var drag_jinzhi = 0;
    document.addEventListener("touchmove", function(e) {
        if (drag_jinzhi == 0) {
            e.preventDefault();
            e.stopPropagation();
        }
    }, false);
    var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf("/") + 1);
    baseUrl = baseUrl.replace("#/", "");

    seajs.config({
        base: baseUrl, // 只定base目录，类似java中的src目录
        alias: { // 目录长的可以声明别名, 这点十分人性化
            "jquery": "js/jquery.min.js"
        },
        'map': [
            [/^(.*\.(?:css|js))(.*)$/i, '$1?20150925']
        ],
        charset: 'utf-8',
        timeout: 20000,
        debug: 0
    });

    var preloader;
    seajs.use("page_preloader/main", function(loader) {
        if (loader == null) {
            console.error("loader null,check it!");
            return;
        }
        preloader = loader;
        loader.prepareCb = function() {
            preloader.update(Math.floor(Math.random() * 30));
        }
        loader.loadCb = function() {
            console.info("loadNote in");
        }
        loader.init();
        loadApp();
        // loadCb.update(50);
    });

    var firstLogin = 0; // {{firstLogin}} ;
    var isApp = false;
    var userInfo = null;

    function loadApp() {
        Lazyload.require(
            'static/css/app.bcda7e732f22e5bced411d0d40e46bc4.css'
        ).and(
            'static/js/moment.min.js'
        ).and(
            'static/js/jquery.js'
        ).and(
            'static/z39/js/dcloud_audio.js'
        ).and(
            'static/z39/js/moveListen.js'
        ).and(
            'static/js/underscore-min.js'
        ).and(
            'static/js/manifest.ec249d185f6b18e7635a.js'
        ).and(
            'static/js/vendor.79f0d491d06cf7c97a6b.js'
        ).and(
            'static/js/app.71d21bb4993fa6f07963.js'
        ).and(
            'static/z39/css/mp3player.css,static/z39/css/fonts/iconfont.css,static/z39/css/orange.css'
        ).then(
            function success() {
                console.log('ready');
                try {
                    preloader.update(100);
                } catch (e) {}
            },
            function failure(failure) {
                console.log(failure);
            }
        );
    }

    function GetQueryString(name) {     
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");     
        var r = window.location.search.substr(1).match(reg);     
        if (r != null) return  unescape(r[2]);
        return null;
    }
    </script>
</body>

</html>